-
Notifications
You must be signed in to change notification settings - Fork 9
saving triggers in tsv file #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Attaching an example of log file. Change the extension back to sub-ctrl666_ses-666_task-visualLocalizer_run-666_events_date-202008051605.log We would just need a script to sort through that. |
|
Also this PR was branched out of my work on the radial motion some changes are not relevant to this specific issue. Sorry. Will flag the parts that are only relevant. |
|
|
||
| %% Timing | ||
|
|
||
| % FOR 7T: if you want to create localizers on the fly, the following must be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our TR will be around 1.8 ms and we to have only one "condition" per volume so we have to make sure some of our parameters are a multiple of the TR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add an automatic check for this that send an error in case we don't the math wrong.
| function cfg = setKeyboards(cfg) | ||
| cfg.keyboard.escapeKey = 'ESCAPE'; | ||
| cfg.keyboard.responseKey = {'space'}; | ||
| cfg.keyboard.responseKey = {'space', 't'}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will be monitoring the trigger keys on the same KbQueue as the responses so we need automate adding the value from cfg.mri.triggeyKey to cfg.keyboard.responseKey
|
|
||
| cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block'}; | ||
| cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for extra precautions we wanto also collect the key pressed by the subject to distinguish keypresses from trigger
|
|
||
| thisEvent.event = iEvent; | ||
| thisEvent.block = iBlock; | ||
| thisEvent.keyName = 'n/a'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dummy value for the events
|
|
||
| responseEvents = getResponse('check', cfg.keyboard.responseBox, cfg, getOnlyPress); | ||
|
|
||
| responseEvents = getResponse('check', cfg.keyboard.responseBox, cfg, ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part and and the one line 154 need refactoring but the logic is to check responses from KbQueue and then save them and change the name of the trial type from response to trigger if necessary
| responseEvents(iResp).block = iBlock; | ||
| responseEvents(iResp).onset = ... | ||
| responseEvents(iResp).onset - cfg.experimentStart; | ||
| responseEvents(iResp).event = 'n/a'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could give the fields block and event some value.
|
fix #6 |
|
merging now 🚀 |
This is to know what condition was presented for every volume.